package L1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * 帅到没朋友
 */
public class _020 {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.valueOf(reader.readLine());
        int[] temp = new int[100000];
        for (int i=0;i<N;i++){
            String[] s = reader.readLine().split(" ");
            if (Integer.valueOf(s[0])==0||Integer.valueOf(s[0])==1)
                continue;
            for (int j=1;j<s.length;j++){
                temp[Integer.valueOf(s[j])]++;
            }
        }
        int M = Integer.valueOf(reader.readLine());
        int num = 0;
        String[] s = reader.readLine().split(" ");
        boolean flag = true;
        for (int i=0;i<s.length;i++){
            if (temp[Integer.valueOf(s[i])]==0){
                if (flag){
                    System.out.print(s[i]);
                    flag=false;
                }else{
                    System.out.print(" "+s[i]);
                }
                num++;
                temp[Integer.valueOf(s[i])]=1;

            }
        }
        if (num==0){
            System.out.println("No one is handsome");
        }
    }
}
